Benjamin Otte [Wed, 28 Mar 2012 01:34:19 +0000 (03:34 +0200)]
shadow: Also rename files
Benjamin Otte [Wed, 28 Mar 2012 01:31:20 +0000 (03:31 +0200)]
shadow: Rename to GtkCssShadowValue
I don't want to confuse css values with other stuff, so there.
Benjamin Otte [Wed, 28 Mar 2012 01:06:08 +0000 (03:06 +0200)]
cssvalue: Remove unused function
Benjamin Otte [Wed, 28 Mar 2012 00:25:22 +0000 (02:25 +0200)]
shadow: Move parse function into GtkShadow
This way, we have less public API.
And gtkcssstylepropertyimpl.c looks less scary (only 1624 lines now).
Benjamin Otte [Tue, 27 Mar 2012 23:56:57 +0000 (01:56 +0200)]
shadow: Make this a GtkCssValue
Benjamin Otte [Tue, 27 Mar 2012 23:18:55 +0000 (01:18 +0200)]
shadow: Remove _gtk_shadow_get_resolved()
It's unused
Benjamin Otte [Tue, 27 Mar 2012 23:07:46 +0000 (01:07 +0200)]
stylepropertyimpl: Make shadows unqueryable
Normal APIs couldn't use GtkShadow anyway as the type was private.
Benjamin Otte [Tue, 27 Mar 2012 23:03:39 +0000 (01:03 +0200)]
theming: Use peek_property() calls to query shadows
Benjamin Otte [Tue, 27 Mar 2012 22:04:29 +0000 (00:04 +0200)]
cssvalue: Split number values into their own class
Benjamin Otte [Tue, 27 Mar 2012 21:54:06 +0000 (23:54 +0200)]
cssstyleproperty: Make query func a vfunc
This will be needed soon.
Benjamin Otte [Tue, 27 Mar 2012 21:23:11 +0000 (23:23 +0200)]
customproperty: Add our own query_value function
I'm about to change the CssStyleProperty one, so better copy things
here.
Benjamin Otte [Tue, 27 Mar 2012 15:25:41 +0000 (17:25 +0200)]
cssstyelproperty: Rempove specified-type and computed-type props
This removes the necessity to keep a GType associated with style
properties and code can now make use of GtkCssValue completely.
Benjamin Otte [Tue, 27 Mar 2012 13:58:22 +0000 (15:58 +0200)]
styleproperty: Remove default parse function
... and assert every style property brings its own.
Benjamin Otte [Tue, 27 Mar 2012 07:05:47 +0000 (09:05 +0200)]
stylepropertyimpl: Add remaining parse functions
Benjamin Otte [Tue, 27 Mar 2012 05:51:20 +0000 (07:51 +0200)]
styleproperty: Simplify compute_value function
The compute_value fallback path is only needed for custom properties,
the real style properties have custom compute functions if they need
them already.
Benjamin Otte [Tue, 27 Mar 2012 05:15:23 +0000 (07:15 +0200)]
css: Move shadow parse/print/compute funcs
They don't belong in the style funcs, as those are for custom
properties, and the shadow type is private.
Benjamin Otte [Tue, 27 Mar 2012 04:29:37 +0000 (06:29 +0200)]
stylepropertyimpl: Add parse funcs for enums
Benjamin Otte [Tue, 27 Mar 2012 03:11:58 +0000 (05:11 +0200)]
stylepropertyimpl: Add color parsing function
This is in preparation for removing the specified type and computed type
properties from GtkCssStyleProperty, which is in preparation for really
using GtkCssValue classes and not GTypes.
Benjamin Otte [Tue, 27 Mar 2012 03:00:35 +0000 (05:00 +0200)]
customproperty: Don't rely on querying style property
This way, we can remove type madness from GtkCssStyleProperty later.
Benjamin Otte [Tue, 27 Mar 2012 02:58:15 +0000 (04:58 +0200)]
styleproperty: Make gtk_style_property_register() not be valist
Instead, make the caller create a GtkCssValue in advance.
Benjamin Otte [Mon, 26 Mar 2012 23:43:12 +0000 (01:43 +0200)]
cssvalue: Add _gtk_css_value_equal()
For now, we return FALSE for all default css values, so this is not very
useful.
I also think of this as an optimization equal, not a guaranteed equal,
because we don't even have a notion of what "equal" means.
For example, for background-repeat, "repeat, repeat" and "repeat"
are functionally equivalent. But the cssvalue has no idea that it's used
for background-repeat.
As a more complicated example, "repeat, no-repeat" and "repeat" are
equal to what one sees as long as there's only one image listed
background-image-source. But once you start transition'ing to an image
with 2 sources, it's different...
Benjamin Otte [Mon, 26 Mar 2012 16:58:23 +0000 (18:58 +0200)]
tests: Change expected errors to conform with output
This change isn't strictly correct, but I can't be bothered until we get
a tokenizer that can really differentiate between allowed values and
invalid syntax.
Benjamin Otte [Mon, 26 Mar 2012 16:54:30 +0000 (18:54 +0200)]
cssparser: Use _gtk_css_parser_error_full()
Benjamin Otte [Mon, 26 Mar 2012 16:36:20 +0000 (18:36 +0200)]
cssparser: Add _gtk_css_parser_error_full()
Benjamin Otte [Mon, 26 Mar 2012 15:24:02 +0000 (17:24 +0200)]
styleproperty: Make _gtk_style_property_parse_value() return a CssValue
Also split out initial/inherit handling into a custom GtkCssValue class.
Benjamin Otte [Mon, 26 Mar 2012 14:22:53 +0000 (16:22 +0200)]
css: Remove _gtk_css_style_property_is_specified_type()
That check is going to be refactored away.
Benjamin Otte [Mon, 26 Mar 2012 06:30:24 +0000 (08:30 +0200)]
cssvalue: Add a CSS value for arrays
Make the value auto-cycle its child values, so it can be used for
background properties.
Benjamin Otte [Mon, 26 Mar 2012 05:46:18 +0000 (07:46 +0200)]
cssvalue: Remove _gtk_css_value_new_take_gvalue()
Having two constructors from GValues complicates refactorings, so I'd
rather not have them.
Benjamin Otte [Mon, 26 Mar 2012 05:26:45 +0000 (07:26 +0200)]
cssvalue: Get rid of unused functions
Benjamin Otte [Mon, 26 Mar 2012 05:08:24 +0000 (07:08 +0200)]
styleproperty: Make _gtk_style_property_query() take a GValue
... and don't make it return a GtkCssValue. We want to use this for
compat with the old GValue APIs after all...
Benjamin Otte [Mon, 26 Mar 2012 04:46:29 +0000 (06:46 +0200)]
styleproperty: Make print_func take a GtkCssValue
Also, constify GtkCssValue getters, so we can pass a const GtkCssValue
to the print_func.
Benjamin Otte [Mon, 26 Mar 2012 04:13:57 +0000 (06:13 +0200)]
cssvalue: Make the structure vtable-based
Don't use real classes, just a vtable.
Benjamin Otte [Sat, 24 Mar 2012 06:02:59 +0000 (07:02 +0100)]
styleproperty: Add support for equal_func
Benjamin Otte [Sat, 24 Mar 2012 01:15:41 +0000 (02:15 +0100)]
stylecontext: Don't clear cache when only state changes
This takes more memory, but changes to backdrop or active state are
quite expensive otherwise.
Benjamin Otte [Sat, 24 Mar 2012 00:13:50 +0000 (01:13 +0100)]
cssmatcher: Use quarks for classes
Benjamin Otte [Fri, 23 Mar 2012 22:52:48 +0000 (23:52 +0100)]
styleproperty: Add a function to compare values for equality
and default to never compare them as equal.
Benjamin Otte [Fri, 23 Mar 2012 22:23:30 +0000 (23:23 +0100)]
cssvalue: Constify a bunch of APIs
Benjamin Otte [Fri, 23 Mar 2012 15:19:22 +0000 (16:19 +0100)]
cssvalue: Remove unused functions
Benjamin Otte [Fri, 23 Mar 2012 02:01:16 +0000 (03:01 +0100)]
stylecontext: Really queue style changes
Instead of instantly applying a new style, just mark the context as
invalid. Only apply the new style at layout time.
Benjamin Otte [Fri, 23 Mar 2012 00:52:38 +0000 (01:52 +0100)]
stylecontext: Optimize the common case of "style didn't change"
Benjamin Otte [Wed, 21 Mar 2012 08:37:09 +0000 (09:37 +0100)]
gtk: Make widget only invalidate widget positions
Instead of resetting them completely
Benjamin Otte [Tue, 20 Mar 2012 17:08:08 +0000 (18:08 +0100)]
window: Set parent context instead of just resetting style
Otherwise the inherit properties won't inherit properly.
Benjamin Otte [Tue, 20 Mar 2012 17:04:37 +0000 (18:04 +0100)]
widget: Replace reset_style() calls
... with finer grained _gtk_widget_invalidate_style_context() calls.
Benjamin Otte [Tue, 20 Mar 2012 15:04:13 +0000 (16:04 +0100)]
widget: Don't go via path when resetting style
Instead, invalidate the path when the style context changes. And
invalidate the style context directly.
Benjamin Otte [Tue, 20 Mar 2012 14:40:53 +0000 (15:40 +0100)]
widget: Add _gtk_widget_invalidate_style_context()
This is supposed to replace gtk_widget_reset_style().
Benjamin Otte [Tue, 20 Mar 2012 13:38:44 +0000 (14:38 +0100)]
widget: Merge function into only caller
Benjamin Otte [Sun, 18 Mar 2012 22:00:25 +0000 (23:00 +0100)]
widget: Clear broken widget path in constructor
... where it belongs instead of fiddling with it in get_path().
Benjamin Otte [Tue, 20 Mar 2012 02:44:26 +0000 (03:44 +0100)]
stylecontext: On failure, exit the loop, don't try again
Because we will fail again. And then we try again. And then we fail
again. Ad infinitum.
Benjamin Otte [Tue, 20 Mar 2012 02:35:36 +0000 (03:35 +0100)]
stylecontext: Invalidate when setting classes/state/regions
... and nobody has called style_context_save().
Benjamin Otte [Tue, 20 Mar 2012 02:21:10 +0000 (03:21 +0100)]
stylecontext: Use _gtk_style_context_queue_invalidate() on self
Benjamin Otte [Tue, 20 Mar 2012 02:15:26 +0000 (03:15 +0100)]
stylecontext: Introduce _gtk_style_context_queue_invalidate()
This is for only queueing invalidations instead of doing a full
invalidation cycle.
Benjamin Otte [Tue, 20 Mar 2012 01:06:00 +0000 (02:06 +0100)]
stylecontext: Keep track of children
Benjamin Otte [Mon, 19 Mar 2012 00:19:59 +0000 (01:19 +0100)]
widget: Don't set widget path on style context
Instead, make the style context use the widget's path. Saves a bunch of
memory.
Benjamin Otte [Sun, 18 Mar 2012 23:25:31 +0000 (00:25 +0100)]
stylecontext: Notify widget directly of changes
This way, we don't need to g_signal_connect(), which saves a bunch of
memory and performance.
Benjamin Otte [Sun, 18 Mar 2012 22:02:33 +0000 (23:02 +0100)]
stylecontext: Add setter for widget
... and actually set the widget on the style context. Note that this
function does not take a reference on the widget, which is a very good
reason to keep it private.
Benjamin Otte [Sun, 18 Mar 2012 15:13:09 +0000 (16:13 +0100)]
matcher: Add a superset matcher
This matcher always matches only on some relvant things and ignores the
rest. This allows you to match only on name and class, but ignore state
and parents/siblings for example.
Benjamin Otte [Sun, 18 Mar 2012 13:42:50 +0000 (14:42 +0100)]
matcher: Add a matcher that matches anything
Lesson learned: Adwaita uses all possible selector types and all of
those for parents, too. But so far no siblings.
Benjamin Otte [Sun, 18 Mar 2012 01:53:44 +0000 (02:53 +0100)]
reftests: Add a reftest for nth-child
Prime numbers are fun.
Benjamin Otte [Sun, 18 Mar 2012 01:19:41 +0000 (02:19 +0100)]
tests: Add a parsing test for nth-child()
Now that we support the an+b notation, make sure we really do.
Maybe my generating script went a bit overboard with the space
possibilities though...
Benjamin Otte [Sun, 18 Mar 2012 01:11:44 +0000 (02:11 +0100)]
selector: Rewrite position tracking
We now track the position as a (type,a,b) tuple where the numbers make
up the an + b formula from CSS3 nth-child.
Also, the get_sibling() and get_sibling_index() vfuncs were replaced by
a has_position() vfunc. This is mostly so that the matcher can always
return TRUE. And I need that for the everything matcher.
Benjamin Otte [Sat, 17 Mar 2012 20:09:51 +0000 (21:09 +0100)]
syleprovider: Add a vfunc to get the changes
This way we can check what changes are even interesting for our matcher.
Benjamin Otte [Sat, 17 Mar 2012 20:02:43 +0000 (21:02 +0100)]
selector: Rename selector class
It's a 'position' pseudoclass, not a 'region' pseudoclass.
Benjamin Otte [Sat, 17 Mar 2012 18:23:53 +0000 (19:23 +0100)]
css: Add selector change types
This allows querying selectors for which changes would change their
"matchingness".
Benjamin Otte [Sat, 17 Mar 2012 13:32:52 +0000 (14:32 +0100)]
matcher: Turn GtkCssMatcher into a union
That way, we can add more matchers as we need them.
Benjamin Otte [Sat, 17 Mar 2012 13:28:07 +0000 (14:28 +0100)]
matcher: Use a vtable
Now we can do lots of fancy matchers, yay!
Benjamin Otte [Sat, 17 Mar 2012 01:36:11 +0000 (02:36 +0100)]
css: Make the style provider take a matcher as an input argument
Benjamin Otte [Sat, 17 Mar 2012 01:17:23 +0000 (02:17 +0100)]
css: Add GtkCssMatcher
This is so we can later do matching with other things than
GtkWidgetPath.
In particular, this is a requirement for getting rid of GtkWidgetPath.
Benjamin Otte [Fri, 16 Mar 2012 04:14:41 +0000 (05:14 +0100)]
styleprovider: Add a custom object for a list of style providers
This way, we don't have to do magic inside GtkStyleContext, but have a
real API.
As a cute bonus, this object implements GtkStyleProvider itself. So we
can just pretend there's only one provider.
Benjamin Otte [Fri, 16 Mar 2012 02:35:13 +0000 (03:35 +0100)]
stylecontext: Stop querying style providers for icon factories
Nobody implements this feature and I don't wanna maintain it. If it
turns out somebody is using it, we gotta invent something.
Benjamin Otte [Fri, 16 Mar 2012 00:23:26 +0000 (01:23 +0100)]
gdk: Add deprecation/availability macros for 3.6
Mario Blättermann [Mon, 16 Apr 2012 19:42:14 +0000 (21:42 +0200)]
[l10n] Updated German translation
Kristian Høgsberg [Tue, 7 Feb 2012 14:08:48 +0000 (09:08 -0500)]
wayland: Prefer X11 backend over Wayland
https://bugzilla.gnome.org/show_bug.cgi?id=674102
Kalev Lember [Sat, 14 Apr 2012 18:30:26 +0000 (21:30 +0300)]
application-window: Move desktop file handling code to separate function
https://bugzilla.gnome.org/show_bug.cgi?id=674118
Rob Bradford [Mon, 16 Apr 2012 14:29:44 +0000 (15:29 +0100)]
build: Add an enable flag to allow enabling Cairo GL backend
This change adds --enable-wayland-cairo-gl which turns on the define used in
the Wayland backend to determine whether to use EGL surfaces with Cairo GL or
whether to use the Cairo image backend with an SHM surface (the default).
Part of the fix for: https://bugzilla.gnome.org/show_bug.cgi?id=672361
Rob Bradford [Thu, 12 Apr 2012 11:11:04 +0000 (12:11 +0100)]
wayland: Use an ARGB buffer for the Cairo and SHM surface
Rob Bradford [Thu, 19 Jan 2012 11:51:50 +0000 (11:51 +0000)]
wayland: Force an expose for the whole area when scrolling
Rob Bradford [Wed, 4 Apr 2012 16:20:13 +0000 (17:20 +0100)]
wayland: Add support for rendering into an SHM buffer with Cairo image backend
The first version of this change included a bug that meant that if you don't
compile for any other backend then it wouldn't search for cairo. Credit for
identifying the bug goes to darxus@chaosreigns.com.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=672361
Rob Bradford [Wed, 4 Apr 2012 13:05:57 +0000 (14:05 +0100)]
wayland: Move the buffer creation to the cairo surface creation
Rob Bradford [Wed, 4 Apr 2012 13:05:27 +0000 (14:05 +0100)]
wayland: Move the finalize function to allow a clear logical block of code
Rob Bradford [Wed, 4 Apr 2012 10:40:52 +0000 (11:40 +0100)]
wayland: Remove unused member from struct
Reşat SABIQ [Mon, 16 Apr 2012 06:56:55 +0000 (01:56 -0500)]
Updated Crimean Tatar (Crimean Turkish) translation
Reşat SABIQ [Mon, 16 Apr 2012 06:54:47 +0000 (01:54 -0500)]
Updated Crimean Tatar (Crimean Turkish) translation
Yinghua Wang [Mon, 16 Apr 2012 06:14:33 +0000 (14:14 +0800)]
update Simplified Chinese (zh_CN) translation
Michael Vogt [Mon, 16 Apr 2012 04:51:43 +0000 (06:51 +0200)]
GtkImage: Move g_clear_object() to gtk_image_finalize()
This moves the freeing of the icon_helper from the destory to the finalize
function to avoid segfaults when trying to access a destroyed object before it
is disposed. This often happens in signal handlers which get called
asynchronously after destroy.
https://bugzilla.gnome.org/show_bug.cgi?id=674050
Kjartan Maraas [Sun, 15 Apr 2012 17:38:20 +0000 (19:38 +0200)]
Updated Norwegian bokmål translation
Matthias Clasen [Sat, 14 Apr 2012 01:26:43 +0000 (21:26 -0400)]
Bump version
Matthias Clasen [Sat, 14 Apr 2012 01:08:06 +0000 (21:08 -0400)]
3.4.1
Cosimo Cecchi [Wed, 11 Apr 2012 14:24:04 +0000 (10:24 -0400)]
application-window: try to use the desktop name in the fallback menu
Try to fetch the name from the application desktop file for the
fallback menu if possible, instead of forcing applications to use
g_set_application_name or hardcoding "Application".
https://bugzilla.gnome.org/show_bug.cgi?id=673882
Cosimo Cecchi [Wed, 11 Apr 2012 14:22:57 +0000 (10:22 -0400)]
build: split out a HAVE_GIO_UNIX config variable
We'll use it in GtkApplicationWindow, since we need to conditionally
depend on gio-unix there.
https://bugzilla.gnome.org/show_bug.cgi?id=673882
Matthias Clasen [Fri, 13 Apr 2012 00:07:28 +0000 (20:07 -0400)]
Fix malformed doc comments
Most of these are forgotten :'s and similar details
which gtk-doc now warns about.
Kalev Lember [Wed, 11 Apr 2012 20:12:15 +0000 (23:12 +0300)]
configure: Use AM_PATH_GLIB_2_0() for finding glib-compile-resources
No need to manually set GLIB_COMPILE_RESOURCES when AM_PATH_GLIB_2_0()
does this for us.
Pavel Holejsovsky [Fri, 23 Mar 2012 06:09:02 +0000 (07:09 +0100)]
Fix sourcedir!=builddir .gir build from source tarball
Setting -I$(top_builddir) before -I$(top_srcdir) causes that
g-ir-scanner picks up boxing definitions generated by glib-mkenums.
https://bugzilla.gnome.org/show_bug.cgi?id=672133
Kristian Rietveld [Sun, 19 Feb 2012 15:08:26 +0000 (16:08 +0100)]
[quartz] Fix manual resizing of windows
In the Quartz backend, there are two methods by which windows are
resized. The first method is fully handled by Quartz and does not appear
in the event stream the application resizes. The second method is when
we resize windows by ourselves. In OS X this happens when a GTK+ resize
grip is used. This resize grip is larger than the Quartz resize grip.
When the resize is started outside the "Quartz area", we have to handle
it by ourselves.
This patch fixes this manual window resizing by ignoring events while we
are in the process of resizing (such that the events actually arrive at
the sendEvent handler of GdkQuartzWindow where this resize is handled).
When the resize has finished we break all grabs such that GDK is not
stuck thinking the cursor is still in the resize window.
Kristian Rietveld [Sun, 19 Feb 2012 15:02:09 +0000 (16:02 +0100)]
Export break_all_grabs() within Quartz backend
Function was renamed to _gdk_quartz_events_break_all_grabs().
Carles Ferrando [Tue, 10 Apr 2012 19:22:30 +0000 (21:22 +0200)]
[l10n]Updated Catalan (Valencian) translation
Jordi Serratosa [Tue, 10 Apr 2012 19:22:22 +0000 (21:22 +0200)]
[l10n] Fixes on Catalan translation
Carles Ferrando [Tue, 10 Apr 2012 19:21:06 +0000 (21:21 +0200)]
[l10n]Updated Catalan (Valencian) translation
Jordi Serratosa [Tue, 10 Apr 2012 19:20:55 +0000 (21:20 +0200)]
[l10n] Fixes on Catalan translation
Benjamin Otte [Tue, 10 Apr 2012 14:55:05 +0000 (16:55 +0200)]
styleproperty: 3rd hotfix for a 3-line patch
I really should not write code sometimes...
Copy/paste error this time.
Benjamin Otte [Tue, 10 Apr 2012 14:14:59 +0000 (16:14 +0200)]
Revert part of "textview: Remove extra magic for drawing children"
This partially reverts commit
df37446f9b4116887865b7ecfddeb535fbc0eacb.
The commit changed API that was public (or at least semi-public) and
it's not worth changing that.
The original bug should still be fixed.
https://bugzilla.gnome.org/show_bug.cgi?id=673839